import Cookies from 'js-cookie'

const key = 'authorization';
// 获取登陆态
export function getToken(){
  return Cookies.get(key);
}

// 设置登陆态
export function setToken(value: string){
  Cookies.set(key, `Bearer ${value}`, {expires: 3})
}

// 清空登陆态
export function removeToken(){
  Cookies.remove(key);
}
